<template>
  <div class="body">
    <Header :active="0"></Header>
    <div style="min-height: calc(100vh - 283px)">
        <div class="w100 rowsb pl-50 pr-50 mt-50">
      <div class="" style="width: 45%">
 <div class="">
          <div class="w90 pb-5 rowsb rowsm mb-35" style="border-bottom: 1px solid rgba(112, 112, 112, .4)">
          <div class="rows rowsm">
            <div class="w-3 h-22 mr-10" style="background-color: #AB1921;"></div>
            <div class="fs-18" style="color: #AB1921">政策资讯</div>
          </div>
          <div class="fs-12 col888 pointer" @click="$router.push('/survey?name=政策资讯')">更多+</div>
        </div>

        <div class="w100 rowsb rowsm mb-22" v-for="(item,index) in newsList" :key="index">
          <router-link :to="{ path: '/surveyDetail', query: { name: '政策资讯', id: item.id} }" target="_blank">
            <div class="one_overflow w-360 fs-14 col333">{{ item.title }}</div>
          </router-link>
          <div class="fs-12 col888">{{item.createTime}}</div>
        </div>
        </div>
      </div>
      <div class="" style="width: 45%">
        <div class="">
          <div class="w90 pb-5 rowsb rowsm mb-35" style="border-bottom: 1px solid rgba(112, 112, 112, .4)">
          <div class="rows rowsm">
            <div class="w-3 h-22 mr-10" style="background-color: #AB1921;"></div>
            <div class="fs-18" style="color: #AB1921">劳动教育动态</div>
          </div>
          <div class="fs-12 col888 pointer" @click="$router.push('/survey?name=劳动教育动态')">更多+</div>
        </div>

        <div class="w100 rowsb rowsm mb-22" v-for="(item,index) in noticeList" :key="index">
          <router-link :to="{ path: '/surveyDetail', query: { name: '劳动教育动态', id: item.id} }" target="_blank">
            <div class="one_overflow w-360 fs-14 col333">{{ item.title }}</div>
          </router-link>
          <div class="fs-12 col888">{{item.createTime}}</div>
        </div>
        </div>
      </div>
        </div>
        <div class="w100 rowsb pl-50 pr-50 mt-50">
        <div class="" style="width: 45%">
 <div class="">
          <div class="w90 pb-5 rowsb rowsm mb-35" style="border-bottom: 1px solid rgba(112, 112, 112, .4)">
          <div class="rows rowsm">
            <div class="w-3 h-22 mr-10" style="background-color: #AB1921;"></div>
            <div class="fs-18" style="color: #AB1921">劳动教育概况</div>
          </div>
          <div class="fs-12 col888 pointer" @click="$router.push('/survey?name=劳动教育概况')">更多+</div>
        </div>

        <div class="w100 rowsb rowsm mb-22" v-for="(item,index) in jyList" :key="index">
          <router-link :to="{ path: '/surveyDetail', query: { name: '劳动教育概况', id: item.id} }" target="_blank">
            <div class="one_overflow w-360 fs-14 col333">{{ item.title }}</div>
          </router-link>
          <div class="fs-12 col888">{{item.createTime}}</div>
        </div>
        </div>
        </div>
        <div class="" style="width: 45%">
        <div class="">
          <div class="w90 pb-5 rowsb rowsm mb-35" style="border-bottom: 1px solid rgba(112, 112, 112, .4)">
          <div class="rows rowsm">
            <div class="w-3 h-22 mr-10" style="background-color: #AB1921;"></div>
            <div class="fs-18" style="color: #AB1921">劳动教育实践基地</div>
          </div>
          <div class="fs-12 col888 pointer" @click="$router.push('/survey?name=劳动教育实践基地')">更多+</div>
        </div>

        <div class="w100 rowsb rowsm mb-22" v-for="(item,index) in sjList" :key="index">
<!--          <div class="one_overflow w-360 fs-14 col333 pointer">{{ item.title }}</div>-->
          <router-link :to="{ path: '/surveyDetail', query: { name: '劳动教育实践基地', id: item.id} }" target="_blank">
            <div class="one_overflow w-360 fs-14 col333">{{ item.title }}</div>
          </router-link>
          <div class="fs-12 col888">{{item.createTime}}</div>
        </div>
        </div>
        </div>
      

      <!-- <div class="" style="width: 520px;">
       <div class="">
         <div class="w100 pb-5 rowsb rowsm mb-35" style="border-bottom: 1px solid rgba(112, 112, 112, .4)">
         <div class="rows rowsm">
           <div class="w-3 h-22 mr-10" style="background-color: #AB1921;"></div>
           <div class="fs-18" style="color: #AB1921">通知公告</div>
         </div>
         <div class="fs-12 col888 pointer" @click="$router.push('/survey?name=通知公告')">更多+</div>
       </div>

       <div class="w100 rowsb rowsm mb-22" v-for="(item,index) in newsList" :key="index">
         <div class="one_overflow w-360 fs-14 col333 pointer">{{ item.content }}</div>
         <div class="fs-12 col888">{{item.time}}</div>
       </div>
       </div>


        <div class="">
          <div class="w100 pb-5 rowsb rowsm mb-35" style="border-bottom: 1px solid rgba(112, 112, 112, .4)">
          <div class="rows rowsm">
            <div class="w-3 h-22 mr-10" style="background-color: #AB1921;"></div>
            <div class="fs-18" style="color: #AB1921">劳动教育数据大屏</div>
          </div>
          <div class="fs-12 col888 pointer" @click="$router.push('/')">更多+</div>
        </div>

        <a href="http://ldjy.zxcvii.top/h5/echars/index.html" target="_blank">
          <img src="http://ldjy.zxcvii.top/file/zb5.png" class="w-585 h-200" alt="">
        </a>
        </div>
      </div> -->
      </div>
    </div>    


    

    <Footer class="mt-24"></Footer>
  </div>
</template>

<script>

import axios from "axios";

export default {
  components: {
    
  },
  props: {},
  data() {
    return {
      newsList:[],
      noticeList:[],
      jyList:[],
      sjList:[]
    };
  },
  watch: {},
  computed: {},
  methods: {
  },
  created() {
    const Axios = axios.create({
      // baseURL: 'http://localhost:8078/'
      baseURL: this.$apiBaseUrl
    });
    Axios.get('/project/prozczx/listNoAccess')
        .then(response => {
          // let list = response.data.rows[0];
          // this.newsList = [list]
          // 截取前5条数据
          this.newsList = response.data.rows.slice(0, 5);
        })
        .catch(error => {
          console.error('请求失败:', error);
        });

    Axios.get('/project/config/listNoAccess?type=2')
        .then(response => {
          // this.noticeList = [response.data.rows[0]];
          this.noticeList = response.data.rows.slice(0, 5);

        })
        .catch(error => {
          console.error('请求失败:', error);
        });
     Axios.get('/project/config/listNoAccess?type=1')
        .then(response => {
          // this.noticeList = [response.data.rows[0]];
          this.jyList = response.data.rows.slice(0, 5);

        })
        .catch(error => {
          console.error('请求失败:', error);
        });
     Axios.get('/project/config/listNoAccess?type=3')
        .then(response => {
          // this.noticeList = [response.data.rows[0]];
          this.sjList = response.data.rows.slice(0, 5);

        })
        .catch(error => {
          console.error('请求失败:', error);
        });
        // project/config/listNoAccess
        // /project/config/listNoAccess
  },
  mounted() {}
};
</script>
<style lang="scss" scoped>
.body {
  background: #fff;
}
.input /deep/ .el-input__inner  {
    border: none;
    background-color: rgba(0, 0, 0, 0);
    font-size: 20px;
    text-align: right;
  }
  .pointer{
    cursor: pointer;
  }
</style>